package com.example.demo.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.example.demo.entity.BookComment;
import com.example.demo.entity.responseJson.OnelevelCommentRes;
import com.example.demo.entity.responseJson.TwoLevelCommentRes;
import com.example.demo.mapper.base.BookCommentBaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;


/**
 * 文章评论表(BookComment)表数据库访问层
 *
 * @author 杨丽辉
 * @since 2021-03-11 14:08:48
 */
@Component
@Mapper
public interface BookCommentMapper extends BookCommentBaseMapper {
    List<OnelevelCommentRes> querybonelevelComment(@Param(Constants.WRAPPER) Wrapper<BookComment> ew);
    List<TwoLevelCommentRes> querybtwoelevelComment(@Param(Constants.WRAPPER) Wrapper<BookComment> ew);
    List<TwoLevelCommentRes> querymyComment(@Param(Constants.WRAPPER) Wrapper<BookComment> ew);
    List<TwoLevelCommentRes> queryreplymyComment(@Param(Constants.WRAPPER) Wrapper<BookComment> ew);
    int countchapterComment(@Param(Constants.WRAPPER) Wrapper<BookComment> ew);
    int countbookComment(@Param(Constants.WRAPPER) Wrapper<BookComment> ew);
    int countbooktwoComment(@Param(Constants.WRAPPER) Wrapper<BookComment> ew);
    int updateoneComment(@Param(Constants.WRAPPER) Wrapper<BookComment> ew);
}
